<%= error_messages_for :nagios_host_group %>

<% form_for(@nagios_host_group) do |f| %>
  <p>
    <b>Name</b><br />
    <%= f.text_field :name %>
  </p>

  <p>
    <b>Host Templates</b><br />
    <%= f.collection_select("nagios_host_template_id", NagiosHostTemplate.find(:all, :order => :name), "id", "name", 
        {},{}) %>
  </p>
  
  <p>
    <b>Hosts</b><br />
    <%= f.text_area :hosts , :rows => 10%>
    <%= submit_to_remote 'nagios_match','Check matched host',
                        :url => {:controller => :nagios_host_groups , :action => :nagios_match, :id => @nagios_host_group},
                        :update => 'update-matched-hosts'
                        %>
  </p>

  <p>
    <%= f.submit "Update" %>
  </p>

  <br/>
  <div id='update-matched-hosts'></div>

  <p>
  	<%= link_to_function "Toggle Service Checks", update_page { |page| page.visual_effect :toggle_blind, 'update-nagios-services' } %>
  </p>

  <%= render(:partial => "nagios_services/mini_edit",:object => @nagios_host_group) %>

  <br/>
  <p>
  	<%= link_to_function "Toggle Service Containers", update_page { |page| page.visual_effect :toggle_blind, 'update-service-containers' } %>
  </p>


  <div id='update-matched-containers'></div>
  <%= render(:partial => "service_containers/mini_edit",:object => @nagios_host_group) %>

<% end %>  






